$(function(){
	$.get('admin/index_menu.php',function(txt){
		//var arr=JSON.parse(txt);
		cosnole.log(txt)
		var arr=txt;
		var list=$('.menu_content');
		var head="<div class='head'><span><b>服务保障</b></span>";
			head+="<span><img src='images/services_01.jpg'  />行货保证</span>";
			head+="<span><img src='images/services_02.jpg'  />发票保障</span>";
			head+="<span><img src='images/services_03.jpg'  />顺丰包邮</span>";
			head+="<span><img src='images/services_04.jpg'  />无忧退换</span>";
			head+="<span><img src='images/services_05.jpg'  />先行赔付</span></div>";
		for(var i=0;i<list.length;i++){
			$(list[i]).append(head);
		}
		for(var i=0;i<arr.length;i++){
			var items="<div class='menu_items'><b>"+arr[i].name+"</b><ul>";
			var subarr=arr[i].sub;
			$.each(subarr,function(k){
				items+="<li><a href='"+subarr[k].url+"'>"+subarr[k].name+"</a></li>";
			});
			items+="</ul></div>"
			$(list[arr[i].parentid-1]).append(items);
		}
	});
});